#!/bin/sh
if [ "$(uci -q get wireless.radio0)" != "" ]; then
	if [ "$(uci -q get wireless.radio0.country)" = "" ]; then
		uci -q batch <<-EOF >/dev/null
			set wireless.radio0.country='00'
			set wireless.default_radio0.skip_inactivity_poll='1'
			commit wireless
		EOF
	fi
	if [ "$(uci -q get wireless.default_radio0.network)" = "lan" ]; then
		uci -q batch <<-EOF >/dev/null
			set wireless.default_radio0.network='wifi'
			commit wireless
		EOF
	
	fi
fi

exit 0
